#include "dbusutil.h"

#ifdef Q_OS_LINUX
#include <QDBusInterface>
#endif

DBusUtil::DBusUtil(QObject *parent)
    : QObject{parent}
{

}

void DBusUtil::showFileLocation(QString filename)
{
#ifdef Q_OS_LINUX
    QDBusInterface interface("org.freedesktop.FileManager1", "/org/freedesktop/FileManager1", "org.freedesktop.FileManager1");
    if (interface.isValid())
        interface.call("ShowItems", QStringList() << filename, "");
#endif
}
